import { Controller, Get, Query } from '@nestjs/common';
import { DocumentService } from '../service/document.service';
import { DocumentTypeDto } from '../dto/document/document.dto';

@Controller('document')
export class DocumentController {
    constructor(
        private documentService: DocumentService
    ) {}

    @Get()
    async getMarkdownDocument(@Query() dto: DocumentTypeDto) {    
        let res = await this.documentService.getMarkdownDocument(dto.type)
        return {
            status: 200,
            content: res
        }
    }
}
